package com.mapper;

import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;

import com.entity.Subject;
import com.entity.vo.SubjectVo;

public interface SubjectMapper {
	//��ѯ�����б� index : ҳ��  , size: ҳ��С
	public List<SubjectVo> selectSubjectDetail(@Param("index") Integer index, @Param("size") Integer size);
	//��ѯ�����б� index : ҳ��  , size: ҳ��С admin
	public List<SubjectVo> selectSubjectDetailAdmin(@Param("index") Integer index, @Param("size") Integer size);
	//subject�б� ��ҳ��Ҫ������
	public Integer selectSubjectDeailCount();
	//根据vsid 查询 subject详细
	public SubjectVo selectOneSubjectDeail(@Param("subid") Integer subid);
	//根据vsid查询投票结果
	public List<Map> selectOptionBL(Integer vsid);
	public Integer saveSubject(Subject sub);
	public Integer selectMaxId();
	public  Subject selectSubjectByName(String name);
	//ɾ������
	public Integer deleteSubjectById(Integer id);
	//����vsid ��ѯ subject
	public  Subject selectSubjectById(Integer vsid);
	//�޸ı���
	public Integer  updateSubject(Subject subject) ;
}
